capture log close
log using agree24-pjt, replace text

//  program:    agree22-analysis.do
//  task:       Data Analysis 
//  project:    CSR Agreement 
//  author:     Hsin-Hsin Pan
//  date:       2024
// #1
// program setup

version 17

/////////////////////////////////////////
// Data Analysis

clear all 
eststo clear
lab drop _all
set more off

use "csr_analysis.dta", clear

su 

/////////////////////////////////////////
// FIGURE 2: 
// Effects of Policy Concession on the Probability of Supporting Agreement
// AMCE

conjoint support_w2 ch_force_w2 ch_missile_w2 ///
                    ch_who_w2   ch_exp_w2 ///
					tw_usarm_w2 tw_indep_w2 ///
                    tw_onech_w2 tw_invest_w2, ///
					base(0 0 0 0 0 0 0 0) ///
				    est(amce) id(responseid_w2)
					
matrix all_results = e(results)				 
display _asis "`e(graph_code)'"
 
coefplot matrix(all_results[,1]), bylabel(Overall) ||, ///
         ci(( 5 6)) keep(*:) xline(0, lpattern(-) lcolor(black%70)) ///
		 scheme(s2color) graphregion(fcolor(white) ilcolor(white) lcolor(white)) ///
		 mcolor(black) ciopts(lcolor(black)) ///
		 coeflabels( ///
		   Hidden="Hidden" Shown="Shown" ///
		   Hidden="Hidden" Shown="Shown" ///
		   Hidden="Hidden" Shown="Shown" ///
           Hidden="Hidden" Shown="Shown" ///
		   Hidden="Hidden" Shown="Shown" ///
		   Hidden="Hidden" Shown="Shown" ///		   
		   Hidden="Hidden" Shown="Shown" ///
		   Hidden="Hidden" Shown="Shown", ///
		   labsize(medsmall)) ///
		 eqlabels(  ///
		   "{bf:China: Pledge to unify Taiwan without the use of force}" ///
		   "{bf:China: Stop fighter jets from circling Taiwan and reduce missiles targeting Taiwan}" ///
           "{bf:China: Support our country's participation in IOs such as WHO}" ///		   
		   "{bf:China: Increase our country's export to China}"  ///
		   "{bf:Taiwan: Reduce arms procurement from the US}" ///
		   "{bf:Taiwan: Pledge to renounce Taiwan's independence}"  ///
		   "{bf:Taiwan: Recognize that both sides belong to one China}" ///
		   "{bf:Taiwan: Reduce restrictions on mainland China's investments in our country}", ///
		 asheadings labsize(medsmall)) ///
		 mlabel mlabsize(medsmall) mlabposition(12) format(%9.2f) ///
		 mlabcolor(black) ///
		 byopts(graphregion(col(white)) cols(3)) ///
		 subtitle(, fcolor (gs15) size(small)) scale(0.7) ///
		 xtitle("AMCE", size(medsmall)) ///
		 xlabel(-0.2(0.1)0.1,labsize(medsmall)) msize(medsmall) ///
		 saving(amce_sup_all.gph, replace)
			 
///////////////////////////////////
// MMs

eststo clear

conjoint support_w2 ch_force_w2 ch_missile_w2 ///
                    ch_who_w2   ch_exp_w2 ///
					tw_usarm_w2 tw_indep_w2 ///
                    tw_onech_w2 tw_invest_w2, ///
				    est(mm) id(responseid_w2)

matrix all_results = e(results)				 
display _asis "`e(graph_code)'"
 
coefplot matrix(all_results[,1]), bylabel(Overall) ||, ///
		 ci(( 5 6)) keep(*:) xline(0.5, lpattern(-) lcolor(black%70)) ///
		 scheme(s2color) graphregion(fcolor(white) ilcolor(white) lcolor(white)) ///
     	 mcolor(black) ciopts(lcolor(black)) ///
		 coeflabels( ///
		   Hidden="Hidden" Shown="Shown" ///
		   Hidden="Hidden" Shown="Shown" ///
		   Hidden="Hidden" Shown="Shown" ///
           Hidden="Hidden" Shown="Shown" ///
		   Hidden="Hidden" Shown="Shown" ///
		   Hidden="Hidden" Shown="Shown" ///		   
		   Hidden="Hidden" Shown="Shown" ///
		   Hidden="Hidden" Shown="Shown", ///
		   labsize(small)) ///
		   eqlabels(  ///
		   "{bf:China: Pledge to unify Taiwan without the use of force}" ///
		   "{bf:China: Stop fighter jets from circling Taiwan and reduce missiles targeting Taiwan}" ///
           "{bf:China: Support our country's participation in IOs such as WHO}" ///		   
		   "{bf:China: Increase our country's export to China}"  ///
		   "{bf:Taiwan: Reduce arms procurement from the US}" ///
		   "{bf:Taiwan: Pledge to renounce Taiwan's independence}"  ///
		   "{bf:Taiwan: Recognize that both sides belong to one China}" ///
		   "{bf:Taiwan: Reduce restrictions on mainland China's investments in our country}", ///
		 asheadings labsize(medsmall)) ///		   
		 mlabel mlabsize(medsmall) mlabposition(12) format(%9.2f) ///
		 mlabcolor(black) ///
		 byopts(graphregion(col(white)) cols(3)) ///
		 subtitle(, fcolor (gs15) size(medsmall)) scale(0.7) ///
		 xtitle("MMs", size(medsmall)) ///
		 xlabel(0.3(0.1)0.6,labsize(medsmall)) msize(medsmall) ///
		 saving(mm_sup_all.gph, replace)

////////////////////////////////////////////////////////////////
// Table 2: 
// Estimated Probability of Supporting Selected Agreements

qui: reg support_w2 i.ch_force_w2 i.ch_missile_w2 ///
                      i.ch_who_w2   i.ch_exp_w2 ///
				      i.tw_usarm_w2 i.tw_indep_w2 ///
                      i.tw_onech_w2 i.tw_invest_w2, /// 
		              cluster(responseid_w2)
			
predict fitted if e(sample)
sum fitted, detail
sort fitted

/////////////////////////////
// Least Welcome
// percentile: <1%
// China: Abandon the use of force to unify Taiwan
// 0
// China: Stop fighter jets and reduce missiles targeting Taiwan
// 0
// China: Support Taiwan's participation in IOs such as WHO
// 0		   
// China: Increase Taiwan's export to China
// 0
// Taiwan: Reduce Taiwan's arms procurement from the US
// 1
// Taiwan: Renounce Taiwan's independence
// 1
// Taiwan: Recognize two sides belong to one China
// 1
// Taiwan: Reduce restrictions on China's investment
// 1

margins, at(ch_force_w2=0 ch_missile_w2=0 ///
            ch_who_w2=0   ch_exp_w2=0 ///
			tw_usarm_w2=1 tw_indep_w2=1 ///
            tw_onech_w2=1 tw_invest_w2=1) ///
            vce(unconditional) 	
		
//////////////////////////////
// Trade for Taiwan to Recognize One China 
// China: Abandon the use of force to unify Taiwan
// 0
// China: Stop fighter jets and reduce missiles targeting Taiwan
// 0
// China: Support Taiwan's participation in IOs such as WHO
// 0		   
// China: Increase Taiwan's export to China
// 1
// Taiwan: Reduce Taiwan's arms procurement from the US
// 0
// Taiwan: Renounce Taiwan's independence
// 0
// Taiwan: Recognize two sides belong to one China
// 1
// Taiwan: Reduce restrictions on China's investment
// 0

margins, at(ch_force_w2=0 ch_missile_w2=0 ///
            ch_who_w2=0   ch_exp_w2=1 ///
			tw_usarm_w2=0 tw_indep_w2=0 ///
            tw_onech_w2=1 tw_invest_w2=1) ///
            vce(unconditional) 
						
//////////////////////////////
// Trade for Taiwan to Reduce Arms Procurement from the U.S. 
// China: Abandon the use of force to unify Taiwan
// 0
// China: Stop fighter jets and reduce missiles targeting Taiwan
// 0
// China: Support Taiwan's participation in IOs such as WHO
// 0		   
// China: Increase Taiwan's export to China
// 1
// Taiwan: Reduce Taiwan's arms procurement from the US
// 1
// Taiwan: Renounce Taiwan's independence
// 0
// Taiwan: Recognize two sides belong to one China
// 0
// Taiwan: Reduce restrictions on China's investment
// 0

margins, at(ch_force_w2=0 ch_missile_w2=0 ///
            ch_who_w2=0   ch_exp_w2=1 ///
			tw_usarm_w2=1 tw_indep_w2=0 ///
            tw_onech_w2=0 tw_invest_w2=0) ///
            vce(unconditional) 

//////////////////////////////
// Security and Trade for Taiwan to Renounce Independence 
// China: Abandon the use of force to unify Taiwan
// 1
// China: Stop fighter jets and reduce missiles targeting Taiwan
// 1
// China: Support Taiwan's participation in IOs such as WHO
// 0		   
// China: Increase Taiwan's export to China
// 1
// Taiwan: Reduce Taiwan's arms procurement from the US
// 0
// Taiwan: Renounce Taiwan's independence
// 1
// Taiwan: Recognize two sides belong to one China
// 0
// Taiwan: Reduce restrictions on China's investment
// 0

margins, at(ch_force_w2=1 ch_missile_w2=1 ///
            ch_who_w2=0   ch_exp_w2=1 ///
			tw_usarm_w2=0 tw_indep_w2=1 ///
            tw_onech_w2=0 tw_invest_w2=0) ///
            vce(unconditional) 
			
//////////////////////////////
// Sheer Economic Exchanges
// China: Abandon the use of force to unify Taiwan
// 0
// China: Stop fighter jets and reduce missiles targeting Taiwan
// 0
// China: Support Taiwan's participation in IOs such as WHO
// 0		   
// China: Increase Taiwan's export to China
// 1
// Taiwan: Reduce Taiwan's arms procurement from the US
// 0
// Taiwan: Renounce Taiwan's independence
// 0
// Taiwan: Recognize two sides belong to one China
// 0
// Taiwan: Reduce restrictions on China's investment
// 1

margins, at(ch_force_w2=0 ch_missile_w2=0 ///
            ch_who_w2=0   ch_exp_w2=1 ///
			tw_usarm_w2=0 tw_indep_w2=0 ///
            tw_onech_w2=0 tw_invest_w2=1) ///
            vce(unconditional) 

//////////////////////////////
// Most Welcome
// percentile: >99%
// China: Abandon the use of force to unify Taiwan
// 1
// China: Stop fighter jets and reduce missiles targeting Taiwan
// 1
// China: Support Taiwan's participation in IOs such as WHO
// 1		   
// China: Increase Taiwan's export to China
// 1
// Taiwan: Reduce Taiwan's arms procurement from the US
// 0
// Taiwan: Renounce Taiwan's independence
// 0
// Taiwan: Recognize two sides belong to one China
// 0
// Taiwan: Reduce restrictions on China's investment
// 0

margins, at(ch_force_w2=1 ch_missile_w2=1 ///
            ch_who_w2=1   ch_exp_w2=1 ///
			tw_usarm_w2=0 tw_indep_w2=0 ///
            tw_onech_w2=0 tw_invest_w2=0) ///
            vce(unconditional) 
					 
//////////////////////////////////////////////////////////////// 
// FIGURE 3: 
// Probability of Support for Hypothetical Agreements by Centile

reg support_w2 i.ch_force_w2 i.ch_missile_w2 ///
               i.ch_who_w2   i.ch_exp_w2 ///
			   i.tw_usarm_w2 i.tw_indep_w2 ///
               i.tw_onech_w2 i.tw_invest_w2, ///
			   cluster(responseid_w2)

predict fitted if e(sample)

centile fitted, centile(10(10)90)
	  
set scheme s1color 

format mean %9.2f
  
twoway scatter id mean, legend(off) yla(1/9, ang(h) grid val noticks) ///
               mc(black) ms(smcircle) ml(mean) mlabposition(12) mlcolor(black) || /// 
               rcap upper lower id, ///
			   lc(black) horizontal ///
			   ytitle("Hypothetical Agreements within Each Centile", size(medsmall)) ///
			   xtitle("Probability of Being Supported", size(medsmall)) ///
			   xlabel(0.3(0.1)0.6,labsize(medsmall)) ///
			   ylabel(0(10)100, labsize(medsmall)) ///
			   msize(vsmall) mcolor(black) ///
			   saving(fig3.gph, replace)
			   
//////////////////////////////////////////////////////////////// 
// FIGURE 4: 
// Effects of Policy Concession on the Probability of Supporting Agreements, 
// By Priming Conditions of Great Power Stance
// Control [Blank]
// AMCE

clear all 

use "csr_analysis.dta", clear

conjoint support_w2 ch_force_w2 ch_missile_w2 ///
                    ch_who_w2   ch_exp_w2 ///
					tw_usarm_w2 tw_indep_w2 ///
                    tw_onech_w2 tw_invest_w2 ///
					if random_usch_w2==1, ///
					base(0 0 0 0 0 0 0 0) ///
				    est(amce) id(responseid_w2)
					
matrix all_results = e(results)				 
display _asis "`e(graph_code)'"
 
coefplot matrix(all_results[,1]), bylabel(Overall) ||, ///
         ci(( 5 6)) keep(*:) xline(0, lpattern(-) lcolor(black%70)) ///
		 scheme(s2color) graphregion(fcolor(white) ilcolor(white) lcolor(white)) ///
		 mcolor(black) ciopts(lcolor(black)) ///
		 coeflabels( ///
		   Hidden="Hidden" Shown="Shown" ///
		   Hidden="Hidden" Shown="Shown" ///
		   Hidden="Hidden" Shown="Shown" ///
           Hidden="Hidden" Shown="Shown" ///
		   Hidden="Hidden" Shown="Shown" ///
		   Hidden="Hidden" Shown="Shown" ///		   
		   Hidden="Hidden" Shown="Shown" ///
		   Hidden="Hidden" Shown="Shown", ///
		   labsize(medsmall)) ///
		 eqlabels(  ///
		   "{bf:China: Pledge to unify Taiwan without the use of force}" ///
		   "{bf:China: Stop fighter jets from circling Taiwan and reduce missiles targeting Taiwan}" ///
           "{bf:China: Support our country's participation in IOs such as WHO}" ///		   
		   "{bf:China: Increase our country's export to China}"  ///
		   "{bf:Taiwan: Reduce arms procurement from the US}" ///
		   "{bf:Taiwan: Pledge to renounce Taiwan's independence}"  ///
		   "{bf:Taiwan: Recognize that both sides belong to one China}" ///
		   "{bf:Taiwan: Reduce restrictions on mainland China's investments in our country}", ///
		 asheadings labsize(medsmall)) ///
		 mlabel mlabsize(medsmall) mlabposition(12) format(%9.2f) ///
		 mlabcolor(black) ///
		 byopts(graphregion(col(white)) cols(3)) ///
		 subtitle(, fcolor (gs15) size(medsmall)) scale(0.7) ///
		 xtitle("AMCE", size(medsmall)) ///
		 xlabel(-0.2(0.1)0.1,labsize(medsmall)) msize(medsmall) ///
		 saving(amce_sup_control.gph, replace)

//////////////////		 
// Control [Blank]
// MMs

eststo clear

conjoint support_w2 ch_force_w2 ch_missile_w2 ///
                    ch_who_w2   ch_exp_w2 ///
					tw_usarm_w2 tw_indep_w2 ///
                    tw_onech_w2 tw_invest_w2 ///
					if random_usch_w2==1, ///
				    est(mm) id(responseid_w2)
					
matrix all_results = e(results)				 
display _asis "`e(graph_code)'"
 
coefplot matrix(all_results[,1]), bylabel(Overall) ||, ///
         ci(( 5 6)) keep(*:) xline(0.5, lpattern(-) lcolor(black%70)) ///
		 scheme(s2color) graphregion(fcolor(white) ilcolor(white) lcolor(white)) ///
		 mcolor(black) ciopts(lcolor(black)) ///
		 coeflabels( ///
		   Hidden="Hidden" Shown="Shown" ///
		   Hidden="Hidden" Shown="Shown" ///
		   Hidden="Hidden" Shown="Shown" ///
           Hidden="Hidden" Shown="Shown" ///
		   Hidden="Hidden" Shown="Shown" ///
		   Hidden="Hidden" Shown="Shown" ///		   
		   Hidden="Hidden" Shown="Shown" ///
		   Hidden="Hidden" Shown="Shown", ///
		   labsize(medsmall)) ///
		 eqlabels(  ///
		   "{bf:China: Pledge to unify Taiwan without the use of force}" ///
		   "{bf:China: Stop fighter jets from circling Taiwan and reduce missiles targeting Taiwan}" ///
           "{bf:China: Support our country's participation in IOs such as WHO}" ///		   
		   "{bf:China: Increase our country's export to China}"  ///
		   "{bf:Taiwan: Reduce arms procurement from the US}" ///
		   "{bf:Taiwan: Pledge to renounce Taiwan's independence}"  ///
		   "{bf:Taiwan: Recognize that both sides belong to one China}" ///
		   "{bf:Taiwan: Reduce restrictions on mainland China's investments in our country}", ///
		 asheadings labsize(medsmall)) ///
		 mlabel mlabsize(medsmall) mlabposition(12) format(%9.2f) ///
		 mlabcolor(black) ///
		 byopts(graphregion(col(white)) cols(3)) ///
		 subtitle(, fcolor (gs15) size(medsmall)) scale(0.7) ///
    	 xtitle("MMs", size(medsmall)) ///
		 xlabel(0.3(0.1)0.6,labsize(medsmall)) msize(medsmall) ///
		 saving(mm_sup_control.gph, replace)
		 
////////////////////////////
// US support
// AMCE

eststo clear

conjoint support_w2 ch_force_w2 ch_missile_w2 ///
                    ch_who_w2   ch_exp_w2 ///
					tw_usarm_w2 tw_indep_w2 ///
                    tw_onech_w2 tw_invest_w2 ///
					if random_usch_w2==2, ///
					base(0 0 0 0 0 0 0 0) ///
				    est(amce) id(responseid_w2)
					
matrix all_results = e(results)				 
display _asis "`e(graph_code)'"
 
coefplot matrix(all_results[,1]), bylabel(Overall) ||, ///
         ci(( 5 6)) keep(*:) xline(0, lpattern(-) lcolor(black%70)) ///
		 scheme(s2color) graphregion(fcolor(white) ilcolor(white) lcolor(white)) ///
		 mcolor(black) ciopts(lcolor(black)) ///
		 coeflabels( ///
		   Hidden="Hidden" Shown="Shown" ///
		   Hidden="Hidden" Shown="Shown" ///
		   Hidden="Hidden" Shown="Shown" ///
           Hidden="Hidden" Shown="Shown" ///
		   Hidden="Hidden" Shown="Shown" ///
		   Hidden="Hidden" Shown="Shown" ///		   
		   Hidden="Hidden" Shown="Shown" ///
		   Hidden="Hidden" Shown="Shown", ///
		   labsize(medsmall)) ///
		 eqlabels(  ///
		   "{bf:China: Pledge to unify Taiwan without the use of force}" ///
		   "{bf:China: Stop fighter jets from circling Taiwan and reduce missiles targeting Taiwan}" ///
           "{bf:China: Support our country's participation in IOs such as WHO}" ///		   
		   "{bf:China: Increase our country's export to China}"  ///
		   "{bf:Taiwan: Reduce arms procurement from the US}" ///
		   "{bf:Taiwan: Pledge to renounce Taiwan's independence}"  ///
		   "{bf:Taiwan: Recognize that both sides belong to one China}" ///
		   "{bf:Taiwan: Reduce restrictions on mainland China's investments in our country}", ///
		 asheadings labsize(medsmall)) ///
		 mlabel mlabsize(medsmall) mlabposition(12) format(%9.2f) ///
		 mlabcolor(black) ///
		 byopts(graphregion(col(white)) cols(3)) ///
		 subtitle(, fcolor (gs15) size(medsmall)) scale(0.7) ///
 		 xtitle("AMCE", size(medsmall)) ///
		 xlabel(-0.2(0.1)0.1,labsize(medsmall)) msize(medsmall) ///
		 saving(amce_sup_us.gph, replace)

////////////////////////////
// US support
// MMs

eststo clear

conjoint support_w2 ch_force_w2 ch_missile_w2 ///
                    ch_who_w2   ch_exp_w2 ///
					tw_usarm_w2 tw_indep_w2 ///
                    tw_onech_w2 tw_invest_w2 ///
					if random_usch_w2==2, ///
				    est(mm) id(responseid_w2)
					
matrix all_results = e(results)				 
display _asis "`e(graph_code)'"
 
coefplot matrix(all_results[,1]), bylabel(Overall) ||, ///
         ci(( 5 6)) keep(*:) xline(0.5, lpattern(-) lcolor(black%70)) ///
		 scheme(s2color) graphregion(fcolor(white) ilcolor(white) lcolor(white)) ///
		 mcolor(black) ciopts(lcolor(black)) ///
		 coeflabels( ///
		   Hidden="Hidden" Shown="Shown" ///
		   Hidden="Hidden" Shown="Shown" ///
		   Hidden="Hidden" Shown="Shown" ///
           Hidden="Hidden" Shown="Shown" ///
		   Hidden="Hidden" Shown="Shown" ///
		   Hidden="Hidden" Shown="Shown" ///		   
		   Hidden="Hidden" Shown="Shown" ///
		   Hidden="Hidden" Shown="Shown", ///
		   labsize(medsmall)) ///
		 eqlabels(  ///
		   "{bf:China: Pledge to unify Taiwan without the use of force}" ///
		   "{bf:China: Stop fighter jets from circling Taiwan and reduce missiles targeting Taiwan}" ///
           "{bf:China: Support our country's participation in IOs such as WHO}" ///		   
		   "{bf:China: Increase our country's export to China}"  ///
		   "{bf:Taiwan: Reduce arms procurement from the US}" ///
		   "{bf:Taiwan: Pledge to renounce Taiwan's independence}"  ///
		   "{bf:Taiwan: Recognize that both sides belong to one China}" ///
		   "{bf:Taiwan: Reduce restrictions on mainland China's investments in our country}", ///
		 asheadings labsize(medsmall)) ///
		 mlabel mlabsize(medsmall) mlabposition(12) format(%9.2f) ///
		 mlabcolor(black) ///
		 byopts(graphregion(col(white)) cols(3)) ///
		 subtitle(, fcolor (gs15) size(medsmall)) scale(0.7) ///
    	 xtitle("MMs", size(medsmall)) ///
		 xlabel(0.3(0.1)0.6,labsize(medsmall)) msize(medsmall) ///
		 saving(mm_sup_us.gph, replace)
		 
///////////////////////////////////
// China's threat
// AMCE

eststo clear

conjoint support_w2 ch_force_w2 ch_missile_w2 ///
                    ch_who_w2   ch_exp_w2 ///
					tw_usarm_w2 tw_indep_w2 ///
                    tw_onech_w2 tw_invest_w2 ///
					if random_usch_w2==3, ///
					base(0 0 0 0 0 0 0 0) ///
				    est(amce) id(responseid_w2)
					
matrix all_results = e(results)				 
display _asis "`e(graph_code)'"
 
coefplot matrix(all_results[,1]), bylabel(Overall) ||, ///
         ci(( 5 6)) keep(*:) xline(0, lpattern(-) lcolor(black%70)) ///
		 scheme(s2color) graphregion(fcolor(white) ilcolor(white) lcolor(white)) ///
		 mcolor(black) ciopts(lcolor(black)) ///
		 coeflabels( ///
		   Hidden="Hidden" Shown="Shown" ///
		   Hidden="Hidden" Shown="Shown" ///
		   Hidden="Hidden" Shown="Shown" ///
           Hidden="Hidden" Shown="Shown" ///
		   Hidden="Hidden" Shown="Shown" ///
		   Hidden="Hidden" Shown="Shown" ///		   
		   Hidden="Hidden" Shown="Shown" ///
		   Hidden="Hidden" Shown="Shown", ///
		   labsize(medsmall)) ///
		 eqlabels(  ///
		   "{bf:China: Pledge to unify Taiwan without the use of force}" ///
		   "{bf:China: Stop fighter jets from circling Taiwan and reduce missiles targeting Taiwan}" ///
           "{bf:China: Support our country's participation in IOs such as WHO}" ///		   
		   "{bf:China: Increase our country's export to China}"  ///
		   "{bf:Taiwan: Reduce arms procurement from the US}" ///
		   "{bf:Taiwan: Pledge to renounce Taiwan's independence}"  ///
		   "{bf:Taiwan: Recognize that both sides belong to one China}" ///
		   "{bf:Taiwan: Reduce restrictions on mainland China's investments in our country}", ///
		 asheadings labsize(medsmall)) ///
		 mlabel mlabsize(medsmall) mlabposition(12) format(%9.2f) ///
		 mlabcolor(black) ///
		 byopts(graphregion(col(white)) cols(3)) ///
		 subtitle(, fcolor (gs15) size(medsmall)) scale(0.7) ///
 		 xtitle("AMCE", size(medsmall)) ///
		 xlabel(-0.2(0.1)0.1,labsize(medsmall)) msize(medsmall) ///
		 saving(amce_sup_ch.gph, replace)

///////////////////////////////////
// China's threat
// MMs

eststo clear

conjoint support_w2 ch_force_w2 ch_missile_w2 ///
                    ch_who_w2   ch_exp_w2 ///
					tw_usarm_w2 tw_indep_w2 ///
                    tw_onech_w2 tw_invest_w2 ///
					if random_usch_w2==3, ///
				    est(mm) id(responseid_w2)
					
matrix all_results = e(results)				 
display _asis "`e(graph_code)'"
 
coefplot matrix(all_results[,1]), bylabel(Overall) ||, ///
         ci(( 5 6)) keep(*:) xline(0.5, lpattern(-) lcolor(black%70)) ///
		 scheme(s2color) graphregion(fcolor(white) ilcolor(white) lcolor(white)) ///
		 mcolor(black) ciopts(lcolor(black)) ///
		 coeflabels( ///
		   Hidden="Hidden" Shown="Shown" ///
		   Hidden="Hidden" Shown="Shown" ///
		   Hidden="Hidden" Shown="Shown" ///
           Hidden="Hidden" Shown="Shown" ///
		   Hidden="Hidden" Shown="Shown" ///
		   Hidden="Hidden" Shown="Shown" ///		   
		   Hidden="Hidden" Shown="Shown" ///
		   Hidden="Hidden" Shown="Shown", ///
		   labsize(medsmall)) ///
		 eqlabels(  ///
		   "{bf:China: Pledge to unify Taiwan without the use of force}" ///
		   "{bf:China: Stop fighter jets from circling Taiwan and reduce missiles targeting Taiwan}" ///
           "{bf:China: Support our country's participation in IOs such as WHO}" ///		   
		   "{bf:China: Increase our country's export to China}"  ///
		   "{bf:Taiwan: Reduce arms procurement from the US}" ///
		   "{bf:Taiwan: Pledge to renounce Taiwan's independence}"  ///
		   "{bf:Taiwan: Recognize that both sides belong to one China}" ///
		   "{bf:Taiwan: Reduce restrictions on mainland China's investments in our country}", ///
		 asheadings labsize(medsmall)) ///
		 mlabel mlabsize(medsmall) mlabposition(12) format(%9.2f) ///
		 mlabcolor(black) ///
		 byopts(graphregion(col(white)) cols(3)) ///
		 subtitle(, fcolor (gs15) size(medsmall)) scale(0.7) ///
    	 xtitle("MMs", size(medsmall)) ///
		 xlabel(0.3(0.1)0.6,labsize(medsmall)) msize(medsmall) ///
		 saving(mm_sup_ch.gph, replace)
		 
///////////////////////////////////
// US support and China's threat 
// AMCE

eststo clear

conjoint support_w2 ch_force_w2 ch_missile_w2 ///
                    ch_who_w2   ch_exp_w2 ///
					tw_usarm_w2 tw_indep_w2 ///
                    tw_onech_w2 tw_invest_w2 ///
					if random_usch_w2==4, ///
					base(0 0 0 0 0 0 0 0) ///
				    est(amce) id(responseid_w2)
					
matrix all_results = e(results)				 
display _asis "`e(graph_code)'"
 
coefplot matrix(all_results[,1]), bylabel(Overall) ||, ///
         ci(( 5 6)) keep(*:) xline(0, lpattern(-) lcolor(black%70)) ///
		 scheme(s2color) graphregion(fcolor(white) ilcolor(white) lcolor(white)) ///
		 mcolor(black) ciopts(lcolor(black)) ///
		 coeflabels( ///
		   Hidden="Hidden" Shown="Shown" ///
		   Hidden="Hidden" Shown="Shown" ///
		   Hidden="Hidden" Shown="Shown" ///
           Hidden="Hidden" Shown="Shown" ///
		   Hidden="Hidden" Shown="Shown" ///
		   Hidden="Hidden" Shown="Shown" ///		   
		   Hidden="Hidden" Shown="Shown" ///
		   Hidden="Hidden" Shown="Shown", ///
		   labsize(medsmall)) ///
		 eqlabels(  ///
		   "{bf:China: Pledge to unify Taiwan without the use of force}" ///
		   "{bf:China: Stop fighter jets from circling Taiwan and reduce missiles targeting Taiwan}" ///
           "{bf:China: Support our country's participation in IOs such as WHO}" ///		   
		   "{bf:China: Increase our country's export to China}"  ///
		   "{bf:Taiwan: Reduce arms procurement from the US}" ///
		   "{bf:Taiwan: Pledge to renounce Taiwan's independence}"  ///
		   "{bf:Taiwan: Recognize that both sides belong to one China}" ///
		   "{bf:Taiwan: Reduce restrictions on mainland China's investments in our country}", ///
		 asheadings labsize(medsmall)) ///
		 mlabel mlabsize(medsmall) mlabposition(12) format(%9.2f) ///
		 mlabcolor(black) ///
		 byopts(graphregion(col(white)) cols(3)) ///
		 subtitle(, fcolor (gs15) size(medsmall)) scale(0.7) ///
		 xtitle("AMCE", size(medsmall)) ///
		 xlabel(-0.2(0.1)0.1,labsize(medsmall)) msize(medsmall) ///
		 saving(amce_sup_usch.gph, replace)

///////////////////////////////////
// US support and China's threat 
// MMs

eststo clear

conjoint support_w2 ch_force_w2 ch_missile_w2 ///
                    ch_who_w2   ch_exp_w2 ///
					tw_usarm_w2 tw_indep_w2 ///
                    tw_onech_w2 tw_invest_w2 ///
					if random_usch_w2==4, ///
				    est(mm) id(responseid_w2)
					
matrix all_results = e(results)				 
display _asis "`e(graph_code)'"
 
coefplot matrix(all_results[,1]), bylabel(Overall) ||, ///
         ci(( 5 6)) keep(*:) xline(0.5, lpattern(-) lcolor(black%70)) ///
		 scheme(s2color) graphregion(fcolor(white) ilcolor(white) lcolor(white)) ///
		 mcolor(black) ciopts(lcolor(black)) ///
		 coeflabels( ///
		   Hidden="Hidden" Shown="Shown" ///
		   Hidden="Hidden" Shown="Shown" ///
		   Hidden="Hidden" Shown="Shown" ///
           Hidden="Hidden" Shown="Shown" ///
		   Hidden="Hidden" Shown="Shown" ///
		   Hidden="Hidden" Shown="Shown" ///		   
		   Hidden="Hidden" Shown="Shown" ///
		   Hidden="Hidden" Shown="Shown", ///
		   labsize(medsmall)) ///
		 eqlabels(  ///
		   "{bf:China: Pledge to unify Taiwan without the use of force}" ///
		   "{bf:China: Stop fighter jets from circling Taiwan and reduce missiles targeting Taiwan}" ///
           "{bf:China: Support our country's participation in IOs such as WHO}" ///		   
		   "{bf:China: Increase our country's export to China}"  ///
		   "{bf:Taiwan: Reduce arms procurement from the US}" ///
		   "{bf:Taiwan: Pledge to renounce Taiwan's independence}"  ///
		   "{bf:Taiwan: Recognize that both sides belong to one China}" ///
		   "{bf:Taiwan: Reduce restrictions on mainland China's investments in our country}", ///
		 asheadings labsize(medsmall)) ///
		 mlabel mlabsize(medsmall) mlabposition(12) format(%9.2f) ///
		 mlabcolor(black) ///
		 byopts(graphregion(col(white)) cols(3)) ///
		 subtitle(, fcolor (gs15) size(medsmall)) scale(0.7) ///
    	 xtitle("MMs", size(medsmall)) ///
		 xlabel(0.3(0.1)0.6,labsize(medsmall)) msize(medsmall) ///
		 saving(mm_sup_usch.gph, replace)		 
		 
//////////////////////////////////////////////////////////
// FIGURE 5: 
// Effects of Policy Attributes on the Probability of China Attacking Taiwan 
// Conditional on Accepting or Rejecting Agreement
// Accepting 
// AMCE

eststo clear

conjoint accept_prob_chwar_w2 ch_force_w2 ch_missile_w2 ///
                              ch_who_w2   ch_exp_w2 ///
					          tw_usarm_w2 tw_indep_w2 ///
                              tw_onech_w2 tw_invest_w2, ///
					          base(0 0 0 0 0 0 0 0) ///
				              est(amce) id(responseid_w2)

matrix all_results = e(results)				 
display _asis "`e(graph_code)'"
 
coefplot matrix(all_results[,1]), bylabel(Overall) ||, ///
         ci(( 5 6)) keep(*:) xline(0, lpattern(-) lcolor(black%70)) ///
		 scheme(s2color) graphregion(fcolor(white) ilcolor(white) lcolor(white)) ///
		 mcolor(black) ciopts(lcolor(black)) ///
		 coeflabels( ///
		   Hidden="Hidden" Shown="Shown" ///
		   Hidden="Hidden" Shown="Shown" ///
		   Hidden="Hidden" Shown="Shown" ///
           Hidden="Hidden" Shown="Shown" ///
		   Hidden="Hidden" Shown="Shown" ///
		   Hidden="Hidden" Shown="Shown" ///		   
		   Hidden="Hidden" Shown="Shown" ///
		   Hidden="Hidden" Shown="Shown", ///
		   labsize(medsmall)) ///
		 eqlabels(  ///
		   "{bf:China: Pledge to unify Taiwan without the use of force}" ///
		   "{bf:China: Stop fighter jets from circling Taiwan and reduce missiles targeting Taiwan}" ///
           "{bf:China: Support our country's participation in IOs such as WHO}" ///		   
		   "{bf:China: Increase our country's export to China}"  ///
		   "{bf:Taiwan: Reduce arms procurement from the US}" ///
		   "{bf:Taiwan: Pledge to renounce Taiwan's independence}"  ///
		   "{bf:Taiwan: Recognize that both sides belong to one China}" ///
		   "{bf:Taiwan: Reduce restrictions on mainland China's investments in our country}", ///
		 asheadings labsize(medsmall)) ///
		 mlabel mlabsize(medsmall) mlabposition(12) format(%9.2f) ///
		 mlabcolor(black) ///
		 byopts(graphregion(col(white)) cols(3)) ///
		 subtitle(, fcolor (gs15) size(medsmall)) scale(0.7) ///
		 xtitle("AMCE", size(medsmall)) ///
		 xlabel(-2(1)3,labsize(small)) msize(small) ///
		 saving(amce_accept_all.gph, replace)
		 
///////////////////////	
// Accepting 
// MMs

eststo clear

conjoint accept_prob_chwar_w2 ch_force_w2 ch_missile_w2 ///
                              ch_who_w2   ch_exp_w2 ///
					          tw_usarm_w2 tw_indep_w2 ///
                              tw_onech_w2 tw_invest_w2, ///
				              est(mm) id(responseid_w2)

matrix all_results = e(results)				 
display _asis "`e(graph_code)'"
 
coefplot matrix(all_results[,1]), bylabel(Overall) ||, ///
         ci(( 5 6)) keep(*:) xline(50, lpattern(-) lcolor(black%70)) ///
		 scheme(s2color) graphregion(fcolor(white) ilcolor(white) lcolor(white)) ///
		 mcolor(black) ciopts(lcolor(black)) ///
		 coeflabels( ///
		   Hidden="Hidden" Shown="Shown" ///
		   Hidden="Hidden" Shown="Shown" ///
		   Hidden="Hidden" Shown="Shown" ///
           Hidden="Hidden" Shown="Shown" ///
		   Hidden="Hidden" Shown="Shown" ///
		   Hidden="Hidden" Shown="Shown" ///		   
		   Hidden="Hidden" Shown="Shown" ///
		   Hidden="Hidden" Shown="Shown", ///
		   labsize(medsmall)) ///
		 eqlabels(  ///
		   "{bf:China: Pledge to unify Taiwan without the use of force}" ///
		   "{bf:China: Stop fighter jets from circling Taiwan and reduce missiles targeting Taiwan}" ///
           "{bf:China: Support our country's participation in IOs such as WHO}" ///		   
		   "{bf:China: Increase our country's export to China}"  ///
		   "{bf:Taiwan: Reduce arms procurement from the US}" ///
		   "{bf:Taiwan: Pledge to renounce Taiwan's independence}"  ///
		   "{bf:Taiwan: Recognize that both sides belong to one China}" ///
		   "{bf:Taiwan: Reduce restrictions on mainland China's investments in our country}", ///
		 asheadings labsize(medsmall)) ///
		 mlabel mlabsize(medsmall) mlabposition(12) format(%9.2f) ///
		 mlabcolor(black) ///
		 byopts(graphregion(col(white)) cols(3)) ///
		 subtitle(, fcolor (gs15) size(medsmall)) scale(0.7) ///
    	 xtitle("MMs", size(medsmall)) ///
		 xlabel(20(10)50,labsize(small)) msize(small) ///
		 saving(mm_accept_all.gph, replace)
		 
///////////////////////		 
// Rejecting
// AMCE

eststo clear

conjoint reject_prob_chwar_w2 ch_force_w2 ch_missile_w2 ///
                              ch_who_w2   ch_exp_w2 ///
					          tw_usarm_w2 tw_indep_w2 ///
                              tw_onech_w2 tw_invest_w2, ///
					          base(0 0 0 0 0 0 0 0) ///
				              est(amce) id(responseid_w2)

matrix all_results = e(results)				 
display _asis "`e(graph_code)'"
 
coefplot matrix(all_results[,1]), bylabel(Overall) ||, ///
         ci(( 5 6)) keep(*:) xline(0, lpattern(-) lcolor(black%70)) ///
		 scheme(s2color) graphregion(fcolor(white) ilcolor(white) lcolor(white)) ///
		 mcolor(black) ciopts(lcolor(black)) ///
		 coeflabels( ///
		   Hidden="Hidden" Shown="Shown" ///
		   Hidden="Hidden" Shown="Shown" ///
		   Hidden="Hidden" Shown="Shown" ///
           Hidden="Hidden" Shown="Shown" ///
		   Hidden="Hidden" Shown="Shown" ///
		   Hidden="Hidden" Shown="Shown" ///		   
		   Hidden="Hidden" Shown="Shown" ///
		   Hidden="Hidden" Shown="Shown", ///
		   labsize(medsmall)) ///
		 eqlabels(  ///
		   "{bf:China: Pledge to unify Taiwan without the use of force}" ///
		   "{bf:China: Stop fighter jets from circling Taiwan and reduce missiles targeting Taiwan}" ///
           "{bf:China: Support our country's participation in IOs such as WHO}" ///		   
		   "{bf:China: Increase our country's export to China}"  ///
		   "{bf:Taiwan: Reduce arms procurement from the US}" ///
		   "{bf:Taiwan: Pledge to renounce Taiwan's independence}"  ///
		   "{bf:Taiwan: Recognize that both sides belong to one China}" ///
		   "{bf:Taiwan: Reduce restrictions on mainland China's investments in our country}", ///
		 asheadings labsize(medsmall)) ///
		 mlabel mlabsize(medsmall) mlabposition(12) format(%9.2f) ///
		 mlabcolor(black) ///
		 byopts(graphregion(col(white)) cols(3)) ///
		 subtitle(, fcolor (gs15) size(medsmall)) scale(0.7) ///
		 xtitle("AMCE", size(medsmall)) ///
		 xlabel(-2(1)3,labsize(small)) msize(small) ///
		 saving(amce_reject_all.gph, replace)
		 
///////////////////////		 
// Rejecting
// MMs

eststo clear

conjoint reject_prob_chwar_w2 ch_force_w2 ch_missile_w2 ///
                              ch_who_w2   ch_exp_w2 ///
					          tw_usarm_w2 tw_indep_w2 ///
                              tw_onech_w2 tw_invest_w2, ///
				              est(mm) id(responseid_w2)

matrix all_results = e(results)				 
display _asis "`e(graph_code)'"
 
coefplot matrix(all_results[,1]), bylabel(Overall) ||, ///
         ci(( 5 6)) keep(*:) xline(50, lpattern(-) lcolor(black%70)) ///
		 scheme(s2color) graphregion(fcolor(white) ilcolor(white) lcolor(white)) ///
		 mcolor(black) ciopts(lcolor(black)) ///
		 coeflabels( ///
		   Hidden="Hidden" Shown="Shown" ///
		   Hidden="Hidden" Shown="Shown" ///
		   Hidden="Hidden" Shown="Shown" ///
           Hidden="Hidden" Shown="Shown" ///
		   Hidden="Hidden" Shown="Shown" ///
		   Hidden="Hidden" Shown="Shown" ///		   
		   Hidden="Hidden" Shown="Shown" ///
		   Hidden="Hidden" Shown="Shown", ///
		   labsize(medsmall)) ///
		 eqlabels(  ///
		   "{bf:China: Pledge to unify Taiwan without the use of force}" ///
		   "{bf:China: Stop fighter jets from circling Taiwan and reduce missiles targeting Taiwan}" ///
           "{bf:China: Support our country's participation in IOs such as WHO}" ///		   
		   "{bf:China: Increase our country's export to China}"  ///
		   "{bf:Taiwan: Reduce arms procurement from the US}" ///
		   "{bf:Taiwan: Pledge to renounce Taiwan's independence}"  ///
		   "{bf:Taiwan: Recognize that both sides belong to one China}" ///
		   "{bf:Taiwan: Reduce restrictions on mainland China's investments in our country}", ///
		 asheadings labsize(medsmall)) ///
		 mlabel mlabsize(medsmall) mlabposition(12) format(%9.2f) ///
		 mlabcolor(black) ///
		 byopts(graphregion(col(white)) cols(3)) ///
		 subtitle(, fcolor (gs15) size(medsmall)) scale(0.7) ///
     	 xtitle("MMs", size(medsmall)) ///
		 xlabel(20(10)50,labsize(small)) msize(small) ///
		 saving(mm_reject_all.gph, replace)		 
		 
//////////////////////////////////////////////////////////
// FIGURE 6: 
// Effects of Policy Attributes on Probability of Supporting Agreement 
// by Respondent's Perceived Credibility of Great Powers (Marginal Means)
// US credibility
// Not credible
// MMs

eststo clear

conjoint support_w2 ch_force_w2 ch_missile_w2 ///
                    ch_who_w2   ch_exp_w2 ///
					tw_usarm_w2 tw_indep_w2 ///
                    tw_onech_w2 tw_invest_w2,   ///
				    est(mm) id(responseid_w2) subgroup(us_credit_w2) 		 

matrix all_results = e(results)				 
display _asis "`e(graph_code)'"

local subgroup `e(subgroupvar)'
local subgroups `e(subgroup_labels)'
local count 1
local pooleddf 0
foreach sub of local subgroups {
    if `count'>2 {
	    di as error "Code only set up for 2 subgroups, aborting to prevent errors"
		exit 198
	}
	local pooleddf = `pooleddf' + `e(df_r_`sub')'
	matrix results`count' = e(results_`sub')
	local label`count' "`sub'"
	local count = `count' + 1
}	

local rows = rowsof(results1)
matrix diff = J(`rows',6,.)
local rnames : rownames results1
local cnames : colnames results1
local reqs : roweq results1
matrix rownames diff = `rnames'
matrix roweq diff = `reqs'
matrix colnames diff = `cnames'

forvalues rownum = 1/`rows' {
	local cdiff = results2[`rownum',1] - results1[`rownum',1]
	local pooledse = sqrt(results2[`rownum',2]^2 + results1[`rownum',2]^2)
	local tstat = (results2[`rownum',1] - results1[`rownum',1])/`pooledse'
	local tfactor = invttail(`pooleddf', 0.025)
	local pvalue = 2*ttail(`pooleddf',abs(`tstat'))
	local lb = `cdiff' - `pooledse'*`tfactor'
	local ub = `cdiff' + `pooledse'*`tfactor'
	matrix diff[`rownum',1]=`cdiff', `pooledse', `tstat', `pvalue', `lb', `ub'
}

di as text "Differences"
matlist diff, border(rows) rowtitle(Variable / Levels) ///
			format(%8.4f) twidth(25) underscore

coefplot  matrix(results1[,1]), bylabel("{bf:Not Credible}") ||  ///
          matrix(results2[,1]), bylabel("{bf:Credible}") ||  ///
		  matrix(diff[,1]), bylabel("{bf:Difference}") || , ///
          ci(( 5 6)) keep(*:) xline(0.5, lpattern(dash) lcolor(black%50)) ///
  		 scheme(s2color) graphregion(fcolor(white) ilcolor(white) lcolor(white)) ///
          mcolor(black) ciopts(lcolor(black)) ///
		 coeflabels( ///
		   Hidden="Hidden" Shown="Shown" ///
		   Hidden="Hidden" Shown="Shown" ///
		   Hidden="Hidden" Shown="Shown" ///
           Hidden="Hidden" Shown="Shown" ///
		   Hidden="Hidden" Shown="Shown" ///
		   Hidden="Hidden" Shown="Shown" ///		   
		   Hidden="Hidden" Shown="Shown" ///
		   Hidden="Hidden" Shown="Shown", ///
		   labsize(vsmall)) ///
		 eqlabels(  ///
		   "{bf:China: Pledge to unify Taiwan without the use of force}" ///
		   "{bf:China: Stop fighter jets from circling Taiwan and reduce missiles targeting Taiwan}" ///
           "{bf:China: Support our country's participation in IOs such as WHO}" ///		   
		   "{bf:China: Increase our country's export to China}"  ///
		   "{bf:Taiwan: Reduce arms procurement from the US}" ///
		   "{bf:Taiwan: Pledge to renounce Taiwan's independence}"  ///
		   "{bf:Taiwan: Recognize that both sides belong to one China}" ///
		   "{bf:Taiwan: Reduce restrictions on mainland China's investments in our country}", ///
		 asheadings labsize(vsmall)) ///
		 mlabel mlabsize(vsmall) mlabposition(12) format(%9.2f) ///
		 mlabcolor(black) ///
		 byopts(graphregion(col(white)) cols(3)) ///
		 subtitle(, fcolor (gs15) size(vsmall)) scale(0.7) ///
		 xlabel(-0.5(0.5)1.0,labsize(vsmall)) msize(vsmall)  ///
		 saving(mm_us_credit.gph, replace)	
		 
// China's credibility
// Not credible 
// MM

eststo clear

conjoint support_w2 ch_force_w2 ch_missile_w2 ///
                    ch_who_w2   ch_exp_w2 ///
					tw_usarm_w2 tw_indep_w2 ///
                    tw_onech_w2 tw_invest_w2,   ///
				    est(mm) id(responseid_w2) subgroup(ch_credit_w2) 		 

matrix all_results = e(results)				 
display _asis "`e(graph_code)'"

local subgroup `e(subgroupvar)'
local subgroups `e(subgroup_labels)'
local count 1
local pooleddf 0
foreach sub of local subgroups {
    if `count'>2 {
	    di as error "Code only set up for 2 subgroups, aborting to prevent errors"
		exit 198
	}
	local pooleddf = `pooleddf' + `e(df_r_`sub')'
	matrix results`count' = e(results_`sub')
	local label`count' "`sub'"
	local count = `count' + 1
}	

local rows = rowsof(results1)
matrix diff = J(`rows',6,.)
local rnames : rownames results1
local cnames : colnames results1
local reqs : roweq results1
matrix rownames diff = `rnames'
matrix roweq diff = `reqs'
matrix colnames diff = `cnames'

forvalues rownum = 1/`rows' {
	local cdiff = results2[`rownum',1] - results1[`rownum',1]
	local pooledse = sqrt(results2[`rownum',2]^2 + results1[`rownum',2]^2)
	local tstat = (results2[`rownum',1] - results1[`rownum',1])/`pooledse'
	local tfactor = invttail(`pooleddf', 0.025)
	local pvalue = 2*ttail(`pooleddf',abs(`tstat'))
	local lb = `cdiff' - `pooledse'*`tfactor'
	local ub = `cdiff' + `pooledse'*`tfactor'
	matrix diff[`rownum',1]=`cdiff', `pooledse', `tstat', `pvalue', `lb', `ub'
}

di as text "Differences"
matlist diff, border(rows) rowtitle(Variable / Levels) ///
			format(%8.4f) twidth(25) underscore
			
coefplot  matrix(results1[,1]), bylabel("{bf:Not Credible}") ||  ///
          matrix(results2[,1]), bylabel("{bf:Credible}") ||  ///
		  matrix(diff[,1]), bylabel("{bf:Difference}") || , ///
		  ci(( 5 6)) keep(*:) xline(0.5, lpattern(dash) lcolor(black%50)) ///
		 scheme(s2color) graphregion(fcolor(white) ilcolor(white) lcolor(white)) ///
          mcolor(black) ciopts(lcolor(black)) ///
		 coeflabels( ///
		   Hidden="Hidden" Shown="Shown" ///
		   Hidden="Hidden" Shown="Shown" ///
		   Hidden="Hidden" Shown="Shown" ///
           Hidden="Hidden" Shown="Shown" ///
		   Hidden="Hidden" Shown="Shown" ///
		   Hidden="Hidden" Shown="Shown" ///		   
		   Hidden="Hidden" Shown="Shown" ///
		   Hidden="Hidden" Shown="Shown", ///
		   labsize(vsmall)) ///
		 eqlabels(  ///
		   "{bf:China: Pledge to unify Taiwan without the use of force}" ///
		   "{bf:China: Stop fighter jets from circling Taiwan and reduce missiles targeting Taiwan}" ///
           "{bf:China: Support our country's participation in IOs such as WHO}" ///		   
		   "{bf:China: Increase our country's export to China}"  ///
		   "{bf:Taiwan: Reduce arms procurement from the US}" ///
		   "{bf:Taiwan: Pledge to renounce Taiwan's independence}"  ///
		   "{bf:Taiwan: Recognize that both sides belong to one China}" ///
		   "{bf:Taiwan: Reduce restrictions on mainland China's investments in our country}", ///
		 asheadings labsize(vsmall)) ///
		 mlabel mlabsize(vsmall) mlabposition(12) format(%9.2f) ///
		 mlabcolor(black) ///
		 byopts(graphregion(col(white)) cols(3)) ///
		 subtitle(, fcolor (gs15) size(vsmall)) scale(0.7) ///
		 xlabel(-0.5(0.5)1.0,labsize(vsmall)) msize(vsmall)  ///
		 saving(mm_ch_credit.gph, replace)	
		 
////////////////////////////////////////////////////////////////
// APPENDIX 2a: 
// Percentage of Policy Concessions Shown in 255 Hypothetical Agreements 
// within Each Decile

reg support_w2 i.ch_force_w2 i.ch_missile_w2 ///
               i.ch_who_w2   i.ch_exp_w2 ///
			   i.tw_usarm_w2 i.tw_indep_w2 ///
               i.tw_onech_w2 i.tw_invest_w2, ///
			   cluster(responseid_w2)
			  					  
predict fitted if e(sample)
browse fitted
sort fitted

///////////////////////////
// APPENDIX 2b: 
// Policy Contents in 255 Hypothetical Agreements Ranked by Support Rate

reg support_w2 i.ch_force_w2 i.ch_missile_w2 ///
               i.ch_who_w2   i.ch_exp_w2 ///
			   i.tw_usarm_w2 i.tw_indep_w2 ///
               i.tw_onech_w2 i.tw_invest_w2, ///
			   cluster(responseid_w2)

centile fitted, centile(10(10)90)
sum fitted, detail
browse fitted
sort fitted

collapse ch_force_w2 ch_missile_w2 ch_who_w2 ch_exp_w2 tw_usarm_w2 tw_indep_w2 tw_onech_w2 tw_invest_w2, by(fitted)

//////////////////////////////////////////////////////////////// 
// APPENDIX 3: 
// Ordinary Least Square Regression (OLS) Models	   
/////////////////////////////////////////
// FIGURE 2: Effects of Policy Concession on the Probability of Supporting Agreement
// AMCE

reg support_w2 i.ch_force_w2 i.ch_missile_w2 ///
               i.ch_who_w2   i.ch_exp_w2 ///
			   i.tw_usarm_w2 i.tw_indep_w2 ///
               i.tw_onech_w2 i.tw_invest_w2, ///
			   cluster(responseid_w2)
eststo m1

////////////////////////////////////////////////////////////////////			
// FIGURE 4: 
// Effects of Policy Concession on the Probability of Supporting Agreements, 
// By Priming Conditions of Great Power Stance
// Control [Blank]
// AMCE

reg support_w2 i.ch_force_w2 i.ch_missile_w2 ///
               i.ch_who_w2   i.ch_exp_w2 ///
		       i.tw_usarm_w2 i.tw_indep_w2 ///
               i.tw_onech_w2 i.tw_invest_w2 ///
			   if random_usch_w2==1, ///
			   cluster(responseid_w2)
eststo m2

////////////////////////////
// US support
// AMCE

reg support_w2 i.ch_force_w2 i.ch_missile_w2 ///
               i.ch_who_w2   i.ch_exp_w2 ///
		       i.tw_usarm_w2 i.tw_indep_w2 ///
               i.tw_onech_w2 i.tw_invest_w2 ///
		       if random_usch_w2==2, ///
			   cluster(responseid_w2)
eststo m3
					
///////////////////////////////////
// China's threat
// AMCE

reg support_w2 i.ch_force_w2 i.ch_missile_w2 ///
               i.ch_who_w2   i.ch_exp_w2 ///
		       i.tw_usarm_w2 i.tw_indep_w2 ///
               i.tw_onech_w2 i.tw_invest_w2 ///
			   if random_usch_w2==3, ///
			   cluster(responseid_w2)
eststo m4
		 
///////////////////////////////////
// US support and China's threat 
// AMCE

reg support_w2 i.ch_force_w2 i.ch_missile_w2 ///
               i.ch_who_w2   i.ch_exp_w2 ///
		       i.tw_usarm_w2 i.tw_indep_w2 ///
               i.tw_onech_w2 i.tw_invest_w2 ///
			   if random_usch_w2==4, ///
			   cluster(responseid_w2)
eststo m5
		
//////////////////////////////////////////////////////////
// FIGURE 5: 
// Effects of Policy Attributes on the Probability of China Attacking Taiwan 
// Conditional on Accepting or Rejecting Agreement
// Accepting 
// AMCE

reg accept_prob_chwar_w2 i.ch_force_w2 i.ch_missile_w2 ///
                         i.ch_who_w2   i.ch_exp_w2 ///
				         i.tw_usarm_w2 i.tw_indep_w2 ///
                         i.tw_onech_w2 i.tw_invest_w2, ///
				         cluster(responseid_w2)
eststo m6
							  
///////////////////////		 
// Rejecting
// AMCE

reg reject_prob_chwar_w2 i.ch_force_w2 i.ch_missile_w2 ///
                         i.ch_who_w2   i.ch_exp_w2 ///
				         i.tw_usarm_w2 i.tw_indep_w2 ///
                         i.tw_onech_w2 i.tw_invest_w2, ///
				         cluster(responseid_w2)
eststo m7
	 
//////////////////////////////////////////////////////////
// FIGURE 6: 
// Effects of Policy Attributes on Probability of Supporting Agreement 
// by Respondent's Perceived Credibility of Great Powers (Marginal Means)
// US credibility
// Not credible
// AMCE

reg support_w2 i.ch_force_w2 i.ch_missile_w2 ///
               i.ch_who_w2   i.ch_exp_w2 ///
		       i.tw_usarm_w2 i.tw_indep_w2 ///
               i.tw_onech_w2 i.tw_invest_w2 ///
			   if us_credit_w2==1, ///
			   cluster(responseid_w2) 	
eststo m8
		 
// China's credibility
// Not credible 
// AMCE

reg support_w2 i.ch_force_w2 i.ch_missile_w2 ///
               i.ch_who_w2   i.ch_exp_w2 ///
		       i.tw_usarm_w2 i.tw_indep_w2 ///
               i.tw_onech_w2 i.tw_invest_w2 ///
			   if ch_credit_w2==1, ///
			   cluster(responseid_w2) 	 
eststo m9		
			
esttab m1 m2 m3 m4 m5 m6 m7 m8 m9 using "tab.csv", replace label nodepvar nonumber ///
	b(2) se(2) ar2 scalar(ll)    ///
	sfmt(%12.2f) brackets ///
    star(* 0.05 ** 0.01 *** 0.001) 	
			
/////////////////////////////////////
// APPENDIX 4: 
// Effects of Policy Attributes on Support for Agreement 
// by Respondent's Priority of Economy or Security
// Economy > Security

eststo clear

conjoint support_w2 ch_force_w2 ch_missile_w2 ///
                    ch_who_w2   ch_exp_w2 ///
					tw_usarm_w2 tw_indep_w2 ///
                    tw_onech_w2 tw_invest_w2,   ///
				    est(mm) id(responseid_w2) subgroup(economy_w2) 		 

matrix all_results = e(results)				 
display _asis "`e(graph_code)'"

local subgroup `e(subgroupvar)'
local subgroups `e(subgroup_labels)'
local count 1
local pooleddf 0
foreach sub of local subgroups {
    if `count'>2 {
	    di as error "Code only set up for 2 subgroups, aborting to prevent errors"
		exit 198
	}
	local pooleddf = `pooleddf' + `e(df_r_`sub')'
	matrix results`count' = e(results_`sub')
	local label`count' "`sub'"
	local count = `count' + 1
}	

local rows = rowsof(results1)
matrix diff = J(`rows',6,.)
local rnames : rownames results1
local cnames : colnames results1
local reqs : roweq results1
matrix rownames diff = `rnames'
matrix roweq diff = `reqs'
matrix colnames diff = `cnames'

forvalues rownum = 1/`rows' {
	local cdiff = results2[`rownum',1] - results1[`rownum',1]
	local pooledse = sqrt(results2[`rownum',2]^2 + results1[`rownum',2]^2)
	local tstat = (results2[`rownum',1] - results1[`rownum',1])/`pooledse'
	local tfactor = invttail(`pooleddf', 0.025)
	local pvalue = 2*ttail(`pooleddf',abs(`tstat'))
	local lb = `cdiff' - `pooledse'*`tfactor'
	local ub = `cdiff' + `pooledse'*`tfactor'
	matrix diff[`rownum',1]=`cdiff', `pooledse', `tstat', `pvalue', `lb', `ub'
}

di as text "Differences"
matlist diff, border(rows) rowtitle(Variable / Levels) ///
			format(%8.4f) twidth(25) underscore
			
coefplot  matrix(results1[,1]), bylabel("{bf:Security over Economy}") ||  ///
          matrix(results2[,1]), bylabel("{bf:Economy over security}") ||  ///
		  matrix(diff[,1]), bylabel("{bf:Difference}") || , ///
		  ci(( 5 6)) keep(*:) xline(0.5, lpattern(dash) lcolor(black%50)) ///
		 scheme(s2color) graphregion(fcolor(white) ilcolor(white) lcolor(white)) ///
          mcolor(black) ciopts(lcolor(black)) ///
		 coeflabels( ///
		   Hidden="Hidden" Shown="Shown" ///
		   Hidden="Hidden" Shown="Shown" ///
		   Hidden="Hidden" Shown="Shown" ///
           Hidden="Hidden" Shown="Shown" ///
		   Hidden="Hidden" Shown="Shown" ///
		   Hidden="Hidden" Shown="Shown" ///		   
		   Hidden="Hidden" Shown="Shown" ///
		   Hidden="Hidden" Shown="Shown", ///
		   labsize(vsmall)) ///
		 eqlabels(  ///
		   "{bf:China: Pledge to unify Taiwan without the use of force}" ///
		   "{bf:China: Stop fighter jets from circling Taiwan and reduce missiles targeting Taiwan}" ///
           "{bf:China: Support our country's participation in IOs such as WHO}" ///		   
		   "{bf:China: Increase our country's export to China}"  ///
		   "{bf:Taiwan: Reduce arms procurement from the US}" ///
		   "{bf:Taiwan: Pledge to renounce Taiwan's independence}"  ///
		   "{bf:Taiwan: Recognize that both sides belong to one China}" ///
		   "{bf:Taiwan: Reduce restrictions on mainland China's investments in our country}", ///
		 asheadings labsize(vsmall)) ///
		 mlabel mlabsize(vsmall) mlabposition(12) format(%9.2f) ///
		 mlabcolor(black) ///
		 byopts(graphregion(col(white)) cols(3)) ///
		 subtitle(, fcolor (gs15) size(vsmall)) scale(0.7) ///
		 xlabel(-0.5(0.5)1.0,labsize(vsmall)) msize(vsmall)  ///
		 saving(mm_eco.gph, replace)	

/////////////////////////////////////		 
// APPENDIX 5: 
// Effects of Policy Attributes on Support for Agreement 
// by Respondent's Stance on Cross-Strait Relations
// (SQ + Unification) vs. Independence
// Independence

eststo clear

conjoint support_w2 ch_force_w2 ch_missile_w2 ///
                    ch_who_w2   ch_exp_w2 ///
					tw_usarm_w2 tw_indep_w2 ///
                    tw_onech_w2 tw_invest_w2,   ///
				    est(mm) id(responseid_w2) subgroup(indep_w2) 		 

matrix all_results = e(results)				 
display _asis "`e(graph_code)'"

local subgroup `e(subgroupvar)'
local subgroups `e(subgroup_labels)'
local count 1
local pooleddf 0
foreach sub of local subgroups {
    if `count'>2 {
	    di as error "Code only set up for 2 subgroups, aborting to prevent errors"
		exit 198
	}
	local pooleddf = `pooleddf' + `e(df_r_`sub')'
	matrix results`count' = e(results_`sub')
	local label`count' "`sub'"
	local count = `count' + 1
}	

local rows = rowsof(results1)
matrix diff = J(`rows',6,.)
local rnames : rownames results1
local cnames : colnames results1
local reqs : roweq results1
matrix rownames diff = `rnames'
matrix roweq diff = `reqs'
matrix colnames diff = `cnames'

forvalues rownum = 1/`rows' {
	local cdiff = results2[`rownum',1] - results1[`rownum',1]
	local pooledse = sqrt(results2[`rownum',2]^2 + results1[`rownum',2]^2)
	local tstat = (results2[`rownum',1] - results1[`rownum',1])/`pooledse'
	local tfactor = invttail(`pooleddf', 0.025)
	local pvalue = 2*ttail(`pooleddf',abs(`tstat'))
	local lb = `cdiff' - `pooledse'*`tfactor'
	local ub = `cdiff' + `pooledse'*`tfactor'
	matrix diff[`rownum',1]=`cdiff', `pooledse', `tstat', `pvalue', `lb', `ub'
}

di as text "Differences"
matlist diff, border(rows) rowtitle(Variable / Levels) ///
			format(%8.4f) twidth(25) underscore
			
coefplot  matrix(results1[,1]), bylabel("{bf:Status Quo + Pro-Unification}") ||  ///
          matrix(results2[,1]), bylabel("{bf:Pro-independence}") ||  ///
		  matrix(diff[,1]), bylabel("{bf:Difference}") || , ///
          ci(( 5 6)) keep(*:) xline(0.5, lpattern(dash) lcolor(black%50)) ///
		 scheme(s2color) graphregion(fcolor(white) ilcolor(white) lcolor(white)) ///
          mcolor(black) ciopts(lcolor(black)) ///
		 coeflabels( ///
		   Hidden="Hidden" Shown="Shown" ///
		   Hidden="Hidden" Shown="Shown" ///
		   Hidden="Hidden" Shown="Shown" ///
           Hidden="Hidden" Shown="Shown" ///
		   Hidden="Hidden" Shown="Shown" ///
		   Hidden="Hidden" Shown="Shown" ///		   
		   Hidden="Hidden" Shown="Shown" ///
		   Hidden="Hidden" Shown="Shown", ///
		   labsize(vsmall)) ///
		 eqlabels(  ///
		   "{bf:China: Pledge to unify Taiwan without the use of force}" ///
		   "{bf:China: Stop fighter jets from circling Taiwan and reduce missiles targeting Taiwan}" ///
           "{bf:China: Support our country's participation in IOs such as WHO}" ///		   
		   "{bf:China: Increase our country's export to China}"  ///
		   "{bf:Taiwan: Reduce arms procurement from the US}" ///
		   "{bf:Taiwan: Pledge to renounce Taiwan's independence}"  ///
		   "{bf:Taiwan: Recognize that both sides belong to one China}" ///
		   "{bf:Taiwan: Reduce restrictions on mainland China's investments in our country}", ///
		 asheadings labsize(vsmall)) ///
		 mlabel mlabsize(vsmall) mlabposition(12) format(%9.2f) ///
		 mlabcolor(black) ///
		 byopts(graphregion(col(white)) cols(3)) ///
		 subtitle(, fcolor (gs15) size(vsmall)) scale(0.7) ///
		 xlabel(-0.5(0.5)1.0,labsize(vsmall)) msize(vsmall)  ///
		 saving(mm_indep.gph, replace)

/////////////////////////////////////// 
// APPENDIX 6: Effects of Policy Attributes on Support for Agreement 
// by Respondent's Party Identity
// Pan-Blue
			  
eststo clear

conjoint support_w2 ch_force_w2 ch_missile_w2 ///
                    ch_who_w2   ch_exp_w2 ///
					tw_usarm_w2 tw_indep_w2 ///
                    tw_onech_w2 tw_invest_w2,   ///
				    est(mm) id(responseid_w2) subgroup(ptyid_w2) 		 

matrix all_results = e(results)				 
display _asis "`e(graph_code)'"

local subgroup `e(subgroupvar)'
local subgroups `e(subgroup_labels)'
local count 1
local pooleddf 0
foreach sub of local subgroups {
    if `count'>2 {
	    di as error "Code only set up for 2 subgroups, aborting to prevent errors"
		exit 198
	}
	local pooleddf = `pooleddf' + `e(df_r_`sub')'
	matrix results`count' = e(results_`sub')
	local label`count' "`sub'"
	local count = `count' + 1
}	

local rows = rowsof(results1)
matrix diff = J(`rows',6,.)
local rnames : rownames results1
local cnames : colnames results1
local reqs : roweq results1
matrix rownames diff = `rnames'
matrix roweq diff = `reqs'
matrix colnames diff = `cnames'

forvalues rownum = 1/`rows' {
	local cdiff = results2[`rownum',1] - results1[`rownum',1]
	local pooledse = sqrt(results2[`rownum',2]^2 + results1[`rownum',2]^2)
	local tstat = (results2[`rownum',1] - results1[`rownum',1])/`pooledse'
	local tfactor = invttail(`pooleddf', 0.025)
	local pvalue = 2*ttail(`pooleddf',abs(`tstat'))
	local lb = `cdiff' - `pooledse'*`tfactor'
	local ub = `cdiff' + `pooledse'*`tfactor'
	matrix diff[`rownum',1]=`cdiff', `pooledse', `tstat', `pvalue', `lb', `ub'
}

di as text "Differences"
matlist diff, border(rows) rowtitle(Variable / Levels) ///
			format(%8.4f) twidth(25) underscore
			
coefplot  matrix(results1[,1]), bylabel("{bf: Pan-Green}") ||  ///
          matrix(results2[,1]), bylabel("{bf: Pan-Blue}") ||  ///
		  matrix(diff[,1]), bylabel("{bf:Difference}") || , ///
          ci(( 5 6)) keep(*:) xline(0.5, lpattern(dash) lcolor(black%50)) ///
		 scheme(s2color) graphregion(fcolor(white) ilcolor(white) lcolor(white)) ///
          mcolor(black) ciopts(lcolor(black)) ///
		 coeflabels( ///
   		   Hidden="Hidden" Shown="Shown" ///
		   Hidden="Hidden" Shown="Shown" ///
		   Hidden="Hidden" Shown="Shown" ///
           Hidden="Hidden" Shown="Shown" ///
		   Hidden="Hidden" Shown="Shown" ///
		   Hidden="Hidden" Shown="Shown" ///		   
		   Hidden="Hidden" Shown="Shown" ///
		   Hidden="Hidden" Shown="Shown", ///
		   labsize(vsmall)) ///
		 eqlabels(  ///
		   "{bf:China: Pledge to unify Taiwan without the use of force}" ///
		   "{bf:China: Stop fighter jets from circling Taiwan and reduce missiles targeting Taiwan}" ///
           "{bf:China: Support our country's participation in IOs such as WHO}" ///		   
		   "{bf:China: Increase our country's export to China}"  ///
		   "{bf:Taiwan: Reduce arms procurement from the US}" ///
		   "{bf:Taiwan: Pledge to renounce Taiwan's independence}"  ///
		   "{bf:Taiwan: Recognize that both sides belong to one China}" ///
		   "{bf:Taiwan: Reduce restrictions on mainland China's investments in our country}", ///
		 asheadings labsize(vsmall)) ///
		 mlabel mlabsize(vsmall) mlabposition(12) format(%9.2f) ///
		 mlabcolor(black) ///
		 byopts(graphregion(col(white)) cols(3)) ///
		 subtitle(, fcolor (gs15) size(vsmall)) scale(0.7) ///
		 xlabel(-0.5(0.5)1.0,labsize(vsmall)) msize(vsmall)  ///
		 saving(mm_ptyid.gph, replace)	 
		 
//////////////////////////////////////////////////////////////// 
// APPENDIX 7: 
// Effects of Policy Attributes on Support for Agreement 
// by Respondent's National Identity
// Chinese or Both
   
eststo clear

conjoint support_w2 ch_force_w2 ch_missile_w2 ///
                    ch_who_w2   ch_exp_w2 ///
					tw_usarm_w2 tw_indep_w2 ///
                    tw_onech_w2 tw_invest_w2,   ///
				    est(mm) id(responseid_w2) subgroup(natlid_w2) 		 

matrix all_results = e(results)				 
display _asis "`e(graph_code)'"

local subgroup `e(subgroupvar)'
local subgroups `e(subgroup_labels)'
local count 1
local pooleddf 0
foreach sub of local subgroups {
    if `count'>2 {
	    di as error "Code only set up for 2 subgroups, aborting to prevent errors"
		exit 198
	}
	local pooleddf = `pooleddf' + `e(df_r_`sub')'
	matrix results`count' = e(results_`sub')
	local label`count' "`sub'"
	local count = `count' + 1
}	

local rows = rowsof(results1)
matrix diff = J(`rows',6,.)
local rnames : rownames results1
local cnames : colnames results1
local reqs : roweq results1
matrix rownames diff = `rnames'
matrix roweq diff = `reqs'
matrix colnames diff = `cnames'

forvalues rownum = 1/`rows' {
	local cdiff = results2[`rownum',1] - results1[`rownum',1]
	local pooledse = sqrt(results2[`rownum',2]^2 + results1[`rownum',2]^2)
	local tstat = (results2[`rownum',1] - results1[`rownum',1])/`pooledse'
	local tfactor = invttail(`pooleddf', 0.025)
	local pvalue = 2*ttail(`pooleddf',abs(`tstat'))
	local lb = `cdiff' - `pooledse'*`tfactor'
	local ub = `cdiff' + `pooledse'*`tfactor'
	matrix diff[`rownum',1]=`cdiff', `pooledse', `tstat', `pvalue', `lb', `ub'
}

di as text "Differences"
matlist diff, border(rows) rowtitle(Variable / Levels) ///
			format(%8.4f) twidth(25) underscore
			
coefplot  matrix(results1[,1]), bylabel("{bf: Taiwanese}") ||  ///
          matrix(results2[,1]), bylabel("{bf: Chinese or Both}") ||  ///
		  matrix(diff[,1]), bylabel("{bf:Difference}") || , ///
          ci(( 5 6)) keep(*:) xline(0.5, lpattern(dash) lcolor(black%50)) ///
		 scheme(s2color) graphregion(fcolor(white) ilcolor(white) lcolor(white)) ///
          mcolor(black) ciopts(lcolor(black)) ///
		 coeflabels( ///
   		   Hidden="Hidden" Shown="Shown" ///
		   Hidden="Hidden" Shown="Shown" ///
		   Hidden="Hidden" Shown="Shown" ///
           Hidden="Hidden" Shown="Shown" ///
		   Hidden="Hidden" Shown="Shown" ///
		   Hidden="Hidden" Shown="Shown" ///		   
		   Hidden="Hidden" Shown="Shown" ///
		   Hidden="Hidden" Shown="Shown", ///
		   labsize(vsmall)) ///
		 eqlabels(  ///
		   "{bf:China: Pledge to unify Taiwan without the use of force}" ///
		   "{bf:China: Stop fighter jets from circling Taiwan and reduce missiles targeting Taiwan}" ///
           "{bf:China: Support our country's participation in IOs such as WHO}" ///		   
		   "{bf:China: Increase our country's export to China}"  ///
		   "{bf:Taiwan: Reduce arms procurement from the US}" ///
		   "{bf:Taiwan: Pledge to renounce Taiwan's independence}"  ///
		   "{bf:Taiwan: Recognize that both sides belong to one China}" ///
		   "{bf:Taiwan: Reduce restrictions on mainland China's investments in our country}", ///
		 asheadings labsize(vsmall)) ///
		 mlabel mlabsize(vsmall) mlabposition(12) format(%9.2f) ///
		 mlabcolor(black) ///
		 byopts(graphregion(col(white)) cols(3)) ///
		 subtitle(, fcolor (gs15) size(vsmall)) scale(0.7) ///
		 xlabel(-0.5(0.5)1.0,labsize(vsmall)) msize(vsmall)  ///
		 saving(mm_natlid.gph, replace)	   

////////////////////////////////////////////////////////////////// 
// APPENDIX 8: 
// Effects of Policy Attributes on Support for Agreement 
// by Respondent's Age
// Before 1978
  
eststo clear

conjoint support_w2 ch_force_w2 ch_missile_w2 ///
                    ch_who_w2   ch_exp_w2 ///
					tw_usarm_w2 tw_indep_w2 ///
                    tw_onech_w2 tw_invest_w2,   ///
				    est(mm) id(responseid_w2) subgroup(age_w2) 		 

matrix all_results = e(results)				 
display _asis "`e(graph_code)'"

local subgroup `e(subgroupvar)'
local subgroups `e(subgroup_labels)'
local count 1
local pooleddf 0
foreach sub of local subgroups {
    if `count'>2 {
	    di as error "Code only set up for 2 subgroups, aborting to prevent errors"
		exit 198
	}
	local pooleddf = `pooleddf' + `e(df_r_`sub')'
	matrix results`count' = e(results_`sub')
	local label`count' "`sub'"
	local count = `count' + 1
}	

local rows = rowsof(results1)
matrix diff = J(`rows',6,.)
local rnames : rownames results1
local cnames : colnames results1
local reqs : roweq results1
matrix rownames diff = `rnames'
matrix roweq diff = `reqs'
matrix colnames diff = `cnames'

forvalues rownum = 1/`rows' {
	local cdiff = results2[`rownum',1] - results1[`rownum',1]
	local pooledse = sqrt(results2[`rownum',2]^2 + results1[`rownum',2]^2)
	local tstat = (results2[`rownum',1] - results1[`rownum',1])/`pooledse'
	local tfactor = invttail(`pooleddf', 0.025)
	local pvalue = 2*ttail(`pooleddf',abs(`tstat'))
	local lb = `cdiff' - `pooledse'*`tfactor'
	local ub = `cdiff' + `pooledse'*`tfactor'
	matrix diff[`rownum',1]=`cdiff', `pooledse', `tstat', `pvalue', `lb', `ub'
}

di as text "Differences"
matlist diff, border(rows) rowtitle(Variable / Levels) ///
			format(%8.4f) twidth(25) underscore
			
coefplot  matrix(results1[,1]), bylabel("{bf: After 1978}") ||  ///
          matrix(results2[,1]), bylabel("{bf: Before 1978}") ||  ///
		  matrix(diff[,1]), bylabel("{bf:Difference}") || , ///
          ci(( 5 6)) keep(*:) xline(0.5, lpattern(dash) lcolor(black%50)) ///
		 scheme(s2color) graphregion(fcolor(white) ilcolor(white) lcolor(white)) ///
         mcolor(black) ciopts(lcolor(black)) ///
		 coeflabels( ///
   		   Hidden="Hidden" Shown="Shown" ///
		   Hidden="Hidden" Shown="Shown" ///
		   Hidden="Hidden" Shown="Shown" ///
           Hidden="Hidden" Shown="Shown" ///
		   Hidden="Hidden" Shown="Shown" ///
		   Hidden="Hidden" Shown="Shown" ///		   
		   Hidden="Hidden" Shown="Shown" ///
		   Hidden="Hidden" Shown="Shown", ///
		   labsize(vsmall)) ///
		 eqlabels(  ///
		   "{bf:China: Pledge to unify Taiwan without the use of force}" ///
		   "{bf:China: Stop fighter jets from circling Taiwan and reduce missiles targeting Taiwan}" ///
           "{bf:China: Support our country's participation in IOs such as WHO}" ///		   
		   "{bf:China: Increase our country's export to China}"  ///
		   "{bf:Taiwan: Reduce arms procurement from the US}" ///
		   "{bf:Taiwan: Pledge to renounce Taiwan's independence}"  ///
		   "{bf:Taiwan: Recognize that both sides belong to one China}" ///
		   "{bf:Taiwan: Reduce restrictions on mainland China's investments in our country}", ///
		 asheadings labsize(vsmall)) ///
		 mlabel mlabsize(vsmall) mlabposition(12) format(%9.2f) ///
		 mlabcolor(black) ///
		 byopts(graphregion(col(white)) cols(3)) ///
		 subtitle(, fcolor (gs15) size(vsmall)) scale(0.7) ///
		 xlabel(-0.5(0.5)1.0,labsize(vsmall)) msize(vsmall)  ///
		 saving(mm_age.gph, replace)		

////////////////////////////////////////////////////////////////
// APPENDIX 9: 
// Effects of Policy Attributes on Support for Agreement 
// by Respondent's Gender
// Male

eststo clear

conjoint support_w2 ch_force_w2 ch_missile_w2 ///
                    ch_who_w2   ch_exp_w2 ///
					tw_usarm_w2 tw_indep_w2 ///
                    tw_onech_w2 tw_invest_w2,   ///
				    est(mm) id(responseid_w2) subgroup(gender_w2) 		 

matrix all_results = e(results)				 
display _asis "`e(graph_code)'"

local subgroup `e(subgroupvar)'
local subgroups `e(subgroup_labels)'
local count 1
local pooleddf 0
foreach sub of local subgroups {
    if `count'>2 {
	    di as error "Code only set up for 2 subgroups, aborting to prevent errors"
		exit 198
	}
	local pooleddf = `pooleddf' + `e(df_r_`sub')'
	matrix results`count' = e(results_`sub')
	local label`count' "`sub'"
	local count = `count' + 1
}	

local rows = rowsof(results1)
matrix diff = J(`rows',6,.)
local rnames : rownames results1
local cnames : colnames results1
local reqs : roweq results1
matrix rownames diff = `rnames'
matrix roweq diff = `reqs'
matrix colnames diff = `cnames'

forvalues rownum = 1/`rows' {
	local cdiff = results2[`rownum',1] - results1[`rownum',1]
	local pooledse = sqrt(results2[`rownum',2]^2 + results1[`rownum',2]^2)
	local tstat = (results2[`rownum',1] - results1[`rownum',1])/`pooledse'
	local tfactor = invttail(`pooleddf', 0.025)
	local pvalue = 2*ttail(`pooleddf',abs(`tstat'))
	local lb = `cdiff' - `pooledse'*`tfactor'
	local ub = `cdiff' + `pooledse'*`tfactor'
	matrix diff[`rownum',1]=`cdiff', `pooledse', `tstat', `pvalue', `lb', `ub'
}

di as text "Differences"
matlist diff, border(rows) rowtitle(Variable / Levels) ///
			format(%8.4f) twidth(25) underscore
			
coefplot  matrix(results1[,1]), bylabel("{bf:Female}") ||  ///
          matrix(results2[,1]), bylabel("{bf:Male}") ||  ///
		  matrix(diff[,1]), bylabel("{bf:Difference}") || , ///
          ci(( 5 6)) keep(*:) xline(0.5, lpattern(dash) lcolor(black%50)) ///
		 scheme(s2color) graphregion(fcolor(white) ilcolor(white) lcolor(white)) ///
          mcolor(black) ciopts(lcolor(black)) ///
		 coeflabels( ///
   		   Hidden="Hidden" Shown="Shown" ///
		   Hidden="Hidden" Shown="Shown" ///
		   Hidden="Hidden" Shown="Shown" ///
           Hidden="Hidden" Shown="Shown" ///
		   Hidden="Hidden" Shown="Shown" ///
		   Hidden="Hidden" Shown="Shown" ///		   
		   Hidden="Hidden" Shown="Shown" ///
		   Hidden="Hidden" Shown="Shown", ///
		   labsize(vsmall)) ///
		 eqlabels(  ///
		   "{bf:China: Pledge to unify Taiwan without the use of force}" ///
		   "{bf:China: Stop fighter jets from circling Taiwan and reduce missiles targeting Taiwan}" ///
           "{bf:China: Support our country's participation in IOs such as WHO}" ///		   
		   "{bf:China: Increase our country's export to China}"  ///
		   "{bf:Taiwan: Reduce arms procurement from the US}" ///
		   "{bf:Taiwan: Pledge to renounce Taiwan's independence}"  ///
		   "{bf:Taiwan: Recognize that both sides belong to one China}" ///
		   "{bf:Taiwan: Reduce restrictions on mainland China's investments in our country}", ///
		 asheadings labsize(vsmall)) ///
		 mlabel mlabsize(vsmall) mlabposition(12) format(%9.2f) ///
		 mlabcolor(black) ///
		 byopts(graphregion(col(white)) cols(3)) ///
		 subtitle(, fcolor (gs15) size(vsmall)) scale(0.7) ///
		 xlabel(-0.5(0.5)1.0,labsize(vsmall)) msize(vsmall)  ///
		 saving(mm_gender.gph, replace)			   
	   
////////////////////////////////////////////////////////////////		 
// APPENDIX 10: Effects of Policy Attributes on Support for Agreement 
// by Respondent's Education
// Below College Education
   
eststo clear

conjoint support_w2 ch_force_w2 ch_missile_w2 ///
                    ch_who_w2   ch_exp_w2 ///
					tw_usarm_w2 tw_indep_w2 ///
                    tw_onech_w2 tw_invest_w2,   ///
				    est(mm) id(responseid_w2) subgroup(college_w2) 		 

matrix all_results = e(results)				 
display _asis "`e(graph_code)'"

local subgroup `e(subgroupvar)'
local subgroups `e(subgroup_labels)'
local count 1
local pooleddf 0
foreach sub of local subgroups {
    if `count'>2 {
	    di as error "Code only set up for 2 subgroups, aborting to prevent errors"
		exit 198
	}
	local pooleddf = `pooleddf' + `e(df_r_`sub')'
	matrix results`count' = e(results_`sub')
	local label`count' "`sub'"
	local count = `count' + 1
}	

local rows = rowsof(results1)
matrix diff = J(`rows',6,.)
local rnames : rownames results1
local cnames : colnames results1
local reqs : roweq results1
matrix rownames diff = `rnames'
matrix roweq diff = `reqs'
matrix colnames diff = `cnames'

forvalues rownum = 1/`rows' {
	local cdiff = results2[`rownum',1] - results1[`rownum',1]
	local pooledse = sqrt(results2[`rownum',2]^2 + results1[`rownum',2]^2)
	local tstat = (results2[`rownum',1] - results1[`rownum',1])/`pooledse'
	local tfactor = invttail(`pooleddf', 0.025)
	local pvalue = 2*ttail(`pooleddf',abs(`tstat'))
	local lb = `cdiff' - `pooledse'*`tfactor'
	local ub = `cdiff' + `pooledse'*`tfactor'
	matrix diff[`rownum',1]=`cdiff', `pooledse', `tstat', `pvalue', `lb', `ub'
}

di as text "Differences"
matlist diff, border(rows) rowtitle(Variable / Levels) ///
			format(%8.4f) twidth(25) underscore
			
coefplot  matrix(results1[,1]), bylabel("{bf: With College Degree}") ||  ///
          matrix(results2[,1]), bylabel("{bf: Without College Degree}") ||  ///
		  matrix(diff[,1]), bylabel("{bf:Difference}") || , ///
          ci(( 5 6)) keep(*:) xline(0.5, lpattern(dash) lcolor(black%50)) ///
		 scheme(s2color) graphregion(fcolor(white) ilcolor(white) lcolor(white)) ///
          mcolor(black) ciopts(lcolor(black)) ///
		 coeflabels( ///
   		   Hidden="Hidden" Shown="Shown" ///
		   Hidden="Hidden" Shown="Shown" ///
		   Hidden="Hidden" Shown="Shown" ///
           Hidden="Hidden" Shown="Shown" ///
		   Hidden="Hidden" Shown="Shown" ///
		   Hidden="Hidden" Shown="Shown" ///		   
		   Hidden="Hidden" Shown="Shown" ///
		   Hidden="Hidden" Shown="Shown", ///
		   labsize(vsmall)) ///
		 eqlabels(  ///
		   "{bf:China: Pledge to unify Taiwan without the use of force}" ///
		   "{bf:China: Stop fighter jets from circling Taiwan and reduce missiles targeting Taiwan}" ///
           "{bf:China: Support our country's participation in IOs such as WHO}" ///		   
		   "{bf:China: Increase our country's export to China}"  ///
		   "{bf:Taiwan: Reduce arms procurement from the US}" ///
		   "{bf:Taiwan: Pledge to renounce Taiwan's independence}"  ///
		   "{bf:Taiwan: Recognize that both sides belong to one China}" ///
		   "{bf:Taiwan: Reduce restrictions on mainland China's investments in our country}", ///
		 asheadings labsize(vsmall)) ///
		 mlabel mlabsize(vsmall) mlabposition(12) format(%9.2f) ///
		 mlabcolor(black) ///
		 byopts(graphregion(col(white)) cols(3)) ///
		 subtitle(, fcolor (gs15) size(vsmall)) scale(0.7) ///
		 xlabel(-0.5(0.5)1.0,labsize(vsmall)) msize(vsmall)  ///
		 saving(mm_college.gph, replace)			   			   		   			   

//////////////////////////////////////////////////////////////// 
// APPENDIX 11: 
// Effects of Policy Attributes on Support for Agreement 
// by Respondent's Region of Residence
// North

eststo clear

conjoint support_w2 ch_force_w2 ch_missile_w2 ///
                    ch_who_w2   ch_exp_w2 ///
					tw_usarm_w2 tw_indep_w2 ///
                    tw_onech_w2 tw_invest_w2,   ///
				    est(mm) id(responseid_w2) subgroup(reg_w2) 		 

matrix all_results = e(results)				 
display _asis "`e(graph_code)'"

local subgroup `e(subgroupvar)'
local subgroups `e(subgroup_labels)'
local count 1
local pooleddf 0
foreach sub of local subgroups {
    if `count'>2 {
	    di as error "Code only set up for 2 subgroups, aborting to prevent errors"
		exit 198
	}
	local pooleddf = `pooleddf' + `e(df_r_`sub')'
	matrix results`count' = e(results_`sub')
	local label`count' "`sub'"
	local count = `count' + 1
}	

local rows = rowsof(results1)
matrix diff = J(`rows',6,.)
local rnames : rownames results1
local cnames : colnames results1
local reqs : roweq results1
matrix rownames diff = `rnames'
matrix roweq diff = `reqs'
matrix colnames diff = `cnames'

forvalues rownum = 1/`rows' {
	local cdiff = results2[`rownum',1] - results1[`rownum',1]
	local pooledse = sqrt(results2[`rownum',2]^2 + results1[`rownum',2]^2)
	local tstat = (results2[`rownum',1] - results1[`rownum',1])/`pooledse'
	local tfactor = invttail(`pooleddf', 0.025)
	local pvalue = 2*ttail(`pooleddf',abs(`tstat'))
	local lb = `cdiff' - `pooledse'*`tfactor'
	local ub = `cdiff' + `pooledse'*`tfactor'
	matrix diff[`rownum',1]=`cdiff', `pooledse', `tstat', `pvalue', `lb', `ub'
}

di as text "Differences"
matlist diff, border(rows) rowtitle(Variable / Levels) ///
			format(%8.4f) twidth(25) underscore
			
coefplot  matrix(results1[,1]), bylabel("{bf: Elsewhere}") ||  ///
          matrix(results2[,1]), bylabel("{bf: North}") ||  ///
		  matrix(diff[,1]), bylabel("{bf:Difference}") || , ///
          ci(( 5 6)) keep(*:) xline(0.5, lpattern(dash) lcolor(black%50)) ///
		 scheme(s2color) graphregion(fcolor(white) ilcolor(white) lcolor(white)) ///
          mcolor(black) ciopts(lcolor(black)) ///
		 coeflabels( ///
   		   Hidden="Hidden" Shown="Shown" ///
		   Hidden="Hidden" Shown="Shown" ///
		   Hidden="Hidden" Shown="Shown" ///
           Hidden="Hidden" Shown="Shown" ///
		   Hidden="Hidden" Shown="Shown" ///
		   Hidden="Hidden" Shown="Shown" ///		   
		   Hidden="Hidden" Shown="Shown" ///
		   Hidden="Hidden" Shown="Shown", ///
		   labsize(vsmall)) ///
		 eqlabels(  ///
		   "{bf:China: Pledge to unify Taiwan without the use of force}" ///
		   "{bf:China: Stop fighter jets from circling Taiwan and reduce missiles targeting Taiwan}" ///
           "{bf:China: Support our country's participation in IOs such as WHO}" ///		   
		   "{bf:China: Increase our country's export to China}"  ///
		   "{bf:Taiwan: Reduce arms procurement from the US}" ///
		   "{bf:Taiwan: Pledge to renounce Taiwan's independence}"  ///
		   "{bf:Taiwan: Recognize that both sides belong to one China}" ///
		   "{bf:Taiwan: Reduce restrictions on mainland China's investments in our country}", ///
		 asheadings labsize(vsmall)) ///
		 mlabel mlabsize(vsmall) mlabposition(12) format(%9.2f) ///
		 mlabcolor(black) ///
		 byopts(graphregion(col(white)) cols(3)) ///
		 subtitle(, fcolor (gs15) size(vsmall)) scale(0.7) ///
		 xlabel(-0.5(0.5)1.0,labsize(vsmall)) msize(vsmall)  ///
		 saving(mm_reg.gph, replace)	   
		   
//////////////////////////////////////////////////////////////// 
// APPENDIX 12: 
// Effects of Policy Attributes on Support for Agreement 
// by Respondent's Income
// Above Medium Income

eststo clear

conjoint support_w2 ch_force_w2 ch_missile_w2 ///
                    ch_who_w2   ch_exp_w2 ///
					tw_usarm_w2 tw_indep_w2 ///
                    tw_onech_w2 tw_invest_w2,   ///
				    est(mm) id(responseid_w2) subgroup(inc_w2) 		 

matrix all_results = e(results)				 
display _asis "`e(graph_code)'"

local subgroup `e(subgroupvar)'
local subgroups `e(subgroup_labels)'
local count 1
local pooleddf 0
foreach sub of local subgroups {
    if `count'>2 {
	    di as error "Code only set up for 2 subgroups, aborting to prevent errors"
		exit 198
	}
	local pooleddf = `pooleddf' + `e(df_r_`sub')'
	matrix results`count' = e(results_`sub')
	local label`count' "`sub'"
	local count = `count' + 1
}	

local rows = rowsof(results1)
matrix diff = J(`rows',6,.)
local rnames : rownames results1
local cnames : colnames results1
local reqs : roweq results1
matrix rownames diff = `rnames'
matrix roweq diff = `reqs'
matrix colnames diff = `cnames'

forvalues rownum = 1/`rows' {
	local cdiff = results2[`rownum',1] - results1[`rownum',1]
	local pooledse = sqrt(results2[`rownum',2]^2 + results1[`rownum',2]^2)
	local tstat = (results2[`rownum',1] - results1[`rownum',1])/`pooledse'
	local tfactor = invttail(`pooleddf', 0.025)
	local pvalue = 2*ttail(`pooleddf',abs(`tstat'))
	local lb = `cdiff' - `pooledse'*`tfactor'
	local ub = `cdiff' + `pooledse'*`tfactor'
	matrix diff[`rownum',1]=`cdiff', `pooledse', `tstat', `pvalue', `lb', `ub'
}

di as text "Differences"
matlist diff, border(rows) rowtitle(Variable / Levels) ///
			format(%8.4f) twidth(25) underscore
			
coefplot  matrix(results1[,1]), bylabel("{bf: Below Medium Income}") ||  ///
          matrix(results2[,1]), bylabel("{bf: Above Medium Income}") ||  ///
		  matrix(diff[,1]), bylabel("{bf:Difference}") || , ///
          ci(( 5 6)) keep(*:) xline(0.5, lpattern(dash) lcolor(black%50)) ///
		 scheme(s2color) graphregion(fcolor(white) ilcolor(white) lcolor(white)) ///
          mcolor(black) ciopts(lcolor(black)) ///
		 coeflabels( ///
   		   Hidden="Hidden" Shown="Shown" ///
		   Hidden="Hidden" Shown="Shown" ///
		   Hidden="Hidden" Shown="Shown" ///
           Hidden="Hidden" Shown="Shown" ///
		   Hidden="Hidden" Shown="Shown" ///
		   Hidden="Hidden" Shown="Shown" ///		   
		   Hidden="Hidden" Shown="Shown" ///
		   Hidden="Hidden" Shown="Shown", ///
		   labsize(vsmall)) ///
		 eqlabels(  ///
		   "{bf:China: Pledge to unify Taiwan without the use of force}" ///
		   "{bf:China: Stop fighter jets from circling Taiwan and reduce missiles targeting Taiwan}" ///
           "{bf:China: Support our country's participation in IOs such as WHO}" ///		   
		   "{bf:China: Increase our country's export to China}"  ///
		   "{bf:Taiwan: Reduce arms procurement from the US}" ///
		   "{bf:Taiwan: Pledge to renounce Taiwan's independence}"  ///
		   "{bf:Taiwan: Recognize that both sides belong to one China}" ///
		   "{bf:Taiwan: Reduce restrictions on mainland China's investments in our country}", ///
		 asheadings labsize(vsmall)) ///
		 mlabel mlabsize(vsmall) mlabposition(12) format(%9.2f) ///
		 mlabcolor(black) ///
		 byopts(graphregion(col(white)) cols(3)) ///
		 subtitle(, fcolor (gs15) size(vsmall)) scale(0.7) ///                                                                                     
		 Estimated Marginal Means", size(vsmall)) ///
		 xlabel(-0.5(0.5)1.0,labsize(vsmall)) msize(vsmall)  ///
		 saving(mm_inc.gph, replace)	
		 
/////////////////////////////////////////////////////////////// 
// APPENDIX 13: 
// Effects of Policy Attributes on Support for Agreement 
// by Respondent's Social Contacts with China 
// Yes		   
	
eststo clear

conjoint support_w2 ch_force_w2 ch_missile_w2 ///
                    ch_who_w2   ch_exp_w2 ///
					tw_usarm_w2 tw_indep_w2 ///
                    tw_onech_w2 tw_invest_w2,   ///
				    est(mm) id(responseid_w2) subgroup(soc_ch2_w2) 		 

matrix all_results = e(results)				 
display _asis "`e(graph_code)'"

local subgroup `e(subgroupvar)'
local subgroups `e(subgroup_labels)'
local count 1
local pooleddf 0
foreach sub of local subgroups {
    if `count'>2 {
	    di as error "Code only set up for 2 subgroups, aborting to prevent errors"
		exit 198
	}
	local pooleddf = `pooleddf' + `e(df_r_`sub')'
	matrix results`count' = e(results_`sub')
	local label`count' "`sub'"
	local count = `count' + 1
}	

local rows = rowsof(results1)
matrix diff = J(`rows',6,.)
local rnames : rownames results1
local cnames : colnames results1
local reqs : roweq results1
matrix rownames diff = `rnames'
matrix roweq diff = `reqs'
matrix colnames diff = `cnames'

forvalues rownum = 1/`rows' {
	local cdiff = results2[`rownum',1] - results1[`rownum',1]
	local pooledse = sqrt(results2[`rownum',2]^2 + results1[`rownum',2]^2)
	local tstat = (results2[`rownum',1] - results1[`rownum',1])/`pooledse'
	local tfactor = invttail(`pooleddf', 0.025)
	local pvalue = 2*ttail(`pooleddf',abs(`tstat'))
	local lb = `cdiff' - `pooledse'*`tfactor'
	local ub = `cdiff' + `pooledse'*`tfactor'
	matrix diff[`rownum',1]=`cdiff', `pooledse', `tstat', `pvalue', `lb', `ub'
}

di as text "Differences"
matlist diff, border(rows) rowtitle(Variable / Levels) ///
			format(%8.4f) twidth(25) underscore
			
coefplot  matrix(results1[,1]), bylabel("{bf: No}") ||  ///
          matrix(results2[,1]), bylabel("{bf: Yes}") ||  ///
		  matrix(diff[,1]), bylabel("{bf:Difference}") || , ///
          ci(( 5 6)) keep(*:) xline(0.5, lpattern(dash) lcolor(black%50)) ///
		 scheme(s2color) graphregion(fcolor(white) ilcolor(white) lcolor(white)) ///
         mcolor(black) ciopts(lcolor(black)) ///
		 coeflabels( ///
   		   Hidden="Hidden" Shown="Shown" ///
		   Hidden="Hidden" Shown="Shown" ///
		   Hidden="Hidden" Shown="Shown" ///
           Hidden="Hidden" Shown="Shown" ///
		   Hidden="Hidden" Shown="Shown" ///
		   Hidden="Hidden" Shown="Shown" ///		   
		   Hidden="Hidden" Shown="Shown" ///
		   Hidden="Hidden" Shown="Shown", ///
		   labsize(vsmall)) ///
		 eqlabels(  ///
		   "{bf:China: Pledge to unify Taiwan without the use of force}" ///
		   "{bf:China: Stop fighter jets from circling Taiwan and reduce missiles targeting Taiwan}" ///
           "{bf:China: Support our country's participation in IOs such as WHO}" ///		   
		   "{bf:China: Increase our country's export to China}"  ///
		   "{bf:Taiwan: Reduce arms procurement from the US}" ///
		   "{bf:Taiwan: Pledge to renounce Taiwan's independence}"  ///
		   "{bf:Taiwan: Recognize that both sides belong to one China}" ///
		   "{bf:Taiwan: Reduce restrictions on mainland China's investments in our country}", ///
		 asheadings labsize(vsmall)) ///
		 mlabel mlabsize(vsmall) mlabposition(12) format(%9.2f) ///
		 mlabcolor(black) ///
		 byopts(graphregion(col(white)) cols(3)) ///
		 subtitle(, fcolor (gs15) size(vsmall)) scale(0.7) ///
		 xlabel(-0.5(0.5)1.0,labsize(vsmall)) msize(vsmall)  ///
		 saving(mm_soc_ch2.gph, replace)			
			
////////////////////////////////////////////////////////////////////			
// Close log file & exit do-file
    
    log close
    exit